

#if defined (__ARM_ARCH_8A__)  || defined (__ARM_ARCH_7__) || \
    defined (__ARM_ARCH_7A__)  || defined (__ARM_ARCH_7R__) || \
    defined (__ARM_ARCH_7M__)  || defined (__ARM_ARCH_7EM__) || \
    defined (__ARM_ARCH_6T2__)
#define HAVE_THUMB2
#endif

#if defined (HAVE_THUMB2) || defined (__ARM_ARCH_6__) || \
    defined (__ARM_ARCH_6J__)  || defined (__ARM_ARCH_6K__) || \
    defined (__ARM_ARCH_6Z__)  || defined (__ARM_ARCH_6ZK__) || \
    defined (__ARM_ARCH_6ZM__)
#define HAVE_LDREX
#endif

#if defined (HAVE_LDREX) || defined(__ARM_ARCH_5TE__) || \
    defined (__ARM_ARCH_5TEJ__)
#define HAVE_LDRD
#endif

#if defined(THUMB2_TEST) && !defined(HAVE_THUMB2)
#error no thumb2
#endif

#if defined(LDREX_TEST) && !defined(HAVE_LDREX)
#error no ldrex
#endif

#if defined(LDRD_TEST) && !defined(HAVE_LDRD)
#error no ldrd
#endif

#if defined(EABI_TEST) && !defined(__ARM_EABI__)
#error not eabi
#endif
